home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / octa209s.zip / octave-2.09 / libs / mkfifo / nmp.h < prev    next >
C/C++ Source or Header  |  1997-08-21  |  2KB  |  55 lines

  1. /*
  2. ** ****************************************************************************
  3. ** Here we define the structure for all the data needed to use a named pipe.
  4. ** (c) Klaus Gebhardt, 1997
  5. ** ****************************************************************************
  6. */
  7.  
  8. /*
  9. ** ****************************************************************************
  10. ** This is part of the server the mkfifo command connects to. This program
  11. ** creates a named pipe which is used for communication between the mkfifo
  12. ** routine and the server. The mkfifo sends the name of the named pipe,
  13. ** which should be created and then receives the return code.
  14. ** (c) Klaus Gebhardt, 1997
  15. ** ****************************************************************************
  16. */
  17.  
  18. /*
  19. ** ****************************************************************************
  20. ** This was written for the OS/2 port of Octave, but it is not part of Octave!
  21. ** You can use the code UNMODIFIED. If you think changes are necessary,
  22. ** please send me a mail (gebhardt@crunch.ikp.physik.th-darmstadt.de).
  23. ** Thanks,
  24. **   Klaus Gebhardt
  25. ** ****************************************************************************
  26. */
  27.  
  28. #ifndef _NMP_H_
  29. #define _NMP_H_
  30.  
  31. #include <sys/types.h>
  32. #include <sys/stat.h>
  33.  
  34. #define INCL_DOSSEMAPHORES
  35. #define INCL_DOSNMPIPES
  36. #define INCL_DOSPROCESS
  37. #include <os2.h>
  38.  
  39. HEV _hev_;
  40.  
  41. /* List of all named pipes */
  42. typedef struct
  43. {
  44.   const char *name;  /* The name of the pipe. */
  45.   mode_t mode;       /* Creation mode. */
  46.   int tid;           /* The thread id. */
  47.   int result;        /* Return code of the thread. */
  48.   void *prev;        /* The previous named pipe in the list. */
  49.   void *next;        /* The next named pipe in the list. */
  50. } _named_pipe_;
  51.  
  52. void nmp_thread (void *);
  53.  
  54. #endif
  55.